<template>
  <h1>--unref--</h1>
  <h1>reactive控制对象</h1>
  搜索条件
  <hr>
  {{ form }}
  <hr>
  商品标题：{{ form.title }}
  金额：{{ form.price }}
  <button @click="form.price+=3">价额+3</button>
  <hr>
  <button @click="getRaw">获得reactive原始数据</button>
</template>

<script setup>
import { reactive, ref, toRaw, unref } from 'vue';

const age = ref(2);
console.log(age);
console.log(unref(age));

const form = reactive({
  title:"玉米",
  price:2
})

const getRaw=()=>{
  console.log(form);
  console.log(toRaw(form));
}
</script>

<style lang="scss" scoped>

</style>